import { Component, ComponentType, lazy, ReactElement } from "react";
import LIneChart from "./components/Chart/LIneChart";
import Home from "./pages/home";
import SendValue from "./pages/SendValue";
import TestComponent from "./pages/testCompnent";
import TestPage from "./pages/testPage";
import TestProps from "./pages/testProps";
import Ts from "./pages/testTs";

export interface RouterListProps {
  path: string;
  Component: ComponentType;
  name: string;
}

const routerList: RouterListProps[] = [
  {
    path: "/login",
    Component: lazy(() => import("@/pages/auth/login")),
    name: "登录",
  },
  {
    path: "/statistics",
    name: "统计",
    Component: lazy(() => import("@/pages/statistics")),
  },
  {
    path: "/foo",
    name: "测试",
    Component: Home,
  },
  {
    path: "/test-component",
    name: "测试",
    Component: TestComponent,
  },
  {
    path: "/test-props",
    name: "测试",
    Component: TestProps,
  },
  {
    path: "/test-ts",
    name: "测试",
    Component: Ts,
  },
  {
    path: "/test",
    name: "123",
    Component: SendValue,
  },
  {
    path: "/test-page",
    name: "123",
    Component: TestPage,
  },
  {
    path: "/test-chart",
    name: "chart",
    Component: LIneChart,
  },
];

export default routerList;
